#define _CRT_SECURE_NO_WARNINGS
#include "List.h"


void Test1() {
	ListNode* List=NULL;
	List = ListInit();
	ListPushBack(List, 1);
	ListPushBack(List, 2);
	ListPushBack(List, 3);
	ListPushBack(List, 4);
	ListPushBack(List, 5);
	ListPrint(List);
	ListPopBack(List);
	ListPopBack(List);
	ListPopBack(List);
	ListPopBack(List);
	ListPrint(List);
	ListDestory(List);
	List = NULL;
}
void Test2() {
	ListNode* List = NULL;
	List = ListInit();
	ListPushFront(List, 5);
	ListPushFront(List, 4);
	ListPushFront(List, 3);
	ListPushFront(List, 2);
	ListPushFront(List, 1);
	ListPrint(List);
	ListPopFront(List);
	ListPopFront(List);
	ListPopFront(List);
	ListPopFront(List);
	ListPopFront(List);
	ListPopFront(List);
	ListPrint(List);

	ListDestory(List);
	List = NULL;

}
void Test3() {
	ListNode* List = NULL;
	List = ListInit();
	ListPushFront(List, 5);
	ListPushFront(List, 4);
	ListPushFront(List, 3);
	ListPushFront(List, 2);
	ListPushFront(List, 1);
	ListPrint(List);
	ListNode* pos = ListFind(List,5);
	if (pos) {
		printf("%d\n", pos->data);
	}

	ListDestory(List);
	List = NULL;
}
int main() {
	Test1();
	return 0;
}